package com.example.supermarket_back.utils;

import java.time.LocalDateTime;


public class StringTools {

    public static boolean isNullOrEmpty(String str) {
        return null == str || "".equals(str) || "null".equals(str);
    }

    public static boolean isNullOrEmpty(Object obj) {
        return null == obj || "".equals(obj);
    }

    public static LocalDateTime transferLocalDateTime(String time){
        String[] split = time.split("-");
        return LocalDateTime.of(Integer.parseInt(split[0]),
                Integer.parseInt(split[1]), Integer.parseInt(split[2]),0,0);
    }
}
